﻿using AutoMapper;
using S.EarTag.API.Application.MediatorCommand.BodyMeasureCommand;
using S.EarTag.API.Application.MediatorCommand.BreedingWeighCommand;
using S.EarTag.API.Application.MediatorCommand.ProductionGradingCommand;
using S.EarTag.API.Mediator.MediatorCommand;
using S.EarTag.API.Mediator.MediatorCommand.AppearanceCommand;
using S.EarTag.API.Mediator.MediatorCommand.EarTagCommand;
using S.EarTag.API.Mediator.MediatorCommand.MarkCommand;
using S.EarTag.Domain.Model;

namespace S.EarTag.API.Extensions.AutoMapper
{
    public class ReadProfile: Profile
    {
        public ReadProfile()
        {
            //如果有相同字段的类型就写一个
            //列如:CreateMap<CellGrid, CellGrid2>();//从前往后传输相同字段的值
            CreateMap<EarTagUpdateCommand, EarTagModel>();
            CreateMap<MarkUpdateCommand,MarkModel>();
            CreateMap<BodyMeasureUpdCommand, BodyMeasureModel>();
            CreateMap<AppearanceUpdateCommand, AppearanceModel>();
            
            CreateMap<AddBreedingCommand, BreedingWeigh>();
            CreateMap<UpdateBreedingCommand, BreedingWeigh>();
            CreateMap<ProductionGradingUpdateCommand, ProductionGrading>();

        }
    }
}
